package com.gopay.common.domain.gsrt;
// Generated 2016-1-16 17:20:08 by Hibernate Tools 4.3.1.Final

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * Entity: 标的信息表-------------标的追踪
 */
@Entity
@Table(name = "GSRT_BIDS_INFO")
public class GsrtBidsInfo implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 标的信息表的主键，自增长
	 */
	private Long id;

	/**
	 * 商户生成的本笔交易的订单号
	 */
	private String merOrderId;

	/**
	 * 商户的提交时间，商户报文上传
	 */
	private Date merTxnTm;

	/**
	 * 商户在国付宝的ID
	 */
	private String merCustId;

	/**
	 * 商户的名称
	 */
	private String merCustName;

	/**
	 * 标的号
	 */
	private String bidNo;

	/**
	 * 标的名称
	 */
	private String bidName;

	/**
	 * 标的金额
	 */
	private BigDecimal merTxnAmt;

	/**
	 * 投资总金额
	 */
	private BigDecimal merTxnAmtCur;

	/**
	 * 标的产品类型 ------01：散标 02：众筹
	 */
	private String bidType;

	/**
	 * 利率（年化）
	 */
	private BigDecimal interest;

	/**
	 * 借款期限
	 */
	private BigDecimal loanLife;

	/**
	 * 借款期限单位（如，年，月，日）
	 */
	private String loanLifeUnit;

	/**
	 * 还款方式 01：一次性还本付息、02：先息后本、03：等额本息、04：等额本金、05、众筹无还款 06:其他
	 */
	private String repaymentType;

	/**
	 * 投标截止日期
	 */
	private Date bidDeadline;

	/**
	 * 借款方协议号
	 */
	private String borrowerConstracterId;

	/**
	 * 是否有担保方 01有 02 没有
	 */
	private String isTenderSurety;

	/**
	 * 放款总金额
	 */
	private BigDecimal totalLoanMakeAmt;

	/**
	 * 回款总金额
	 */
	private BigDecimal totalReturnMoneyAmt;

	/**
	 * 放款分账总金额
	 */
	private BigDecimal totalLoanDisAmt;

	/**
	 * 回款分账总金额
	 */
	private BigDecimal totalLoanReturnedAmt;

	/**
	 * 流标总金额
	 */
	private BigDecimal totalFailureBidsAmt;
	/**
	 * 还款总金额
	 */
	private BigDecimal totalRepaymentAmt;

	/**
	 * 银行审核状态 恒丰银行(P-审核通过 R-审核拒绝 S-待审核 F-附件已上传） 银行审核状态
	 */
	private String bankState;

	/**
	 * 乐观锁版本号
	 */
	private Long version;

	/**
	 * 记录最后修改时间
	 */
	private Date lastUpdTs;

	/**
	 * 交易原因
	 */
	private String commentRk;

	/**
	 * 创建时间
	 */
	private Date createTs;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 预留字段2
	 */
	private String remark2;

	/**
	 * 预留字段3
	 */
	private String remark3;

	/**
	 * 网关交易流水号
	 */
	private Long transDtlSq;

	/**
	 * 标的状态
	 */
	private String bidState;

	/**
	 * 国付宝交易时间
	 */
	private Date gopayTxnTm;

	/**
	 * 国付宝订单号
	 */
	private String gopayOrderId;

	public GsrtBidsInfo() {
	}

	public GsrtBidsInfo(Long id, String merOrderId, Date merTxnTm, String merCustId, String merCustName, String bidNo,
			String bidName, BigDecimal merTxnAmt, BigDecimal merTxnAmtCur, String bidType, BigDecimal interest,
			BigDecimal loanLife, String loanLifeUnit, String repaymentType, Date bidDeadline,
			String borrowerConstracterId, String isTenderSurety, BigDecimal totalLoanMakeAmt,
			BigDecimal totalReturnMoneyAmt, BigDecimal totalLoanDisAmt, BigDecimal totalFailureBidsAmt, Long version,
			Date lastUpdTs, String commentRk, Date createTs, String remark, String remark2, String remark3,
			Long transDtlSq, String bidState) {
		super();
		this.id = id;
		this.merOrderId = merOrderId;
		this.merTxnTm = merTxnTm;
		this.merCustId = merCustId;
		this.merCustName = merCustName;
		this.bidNo = bidNo;
		this.bidName = bidName;
		this.merTxnAmt = merTxnAmt;
		this.merTxnAmtCur = merTxnAmtCur;
		this.bidType = bidType;
		this.interest = interest;
		this.loanLife = loanLife;
		this.loanLifeUnit = loanLifeUnit;
		this.repaymentType = repaymentType;
		this.bidDeadline = bidDeadline;
		this.borrowerConstracterId = borrowerConstracterId;
		this.isTenderSurety = isTenderSurety;
		this.totalLoanMakeAmt = totalLoanMakeAmt;
		this.totalReturnMoneyAmt = totalReturnMoneyAmt;
		this.totalLoanDisAmt = totalLoanDisAmt;
		this.totalFailureBidsAmt = totalFailureBidsAmt;
		this.version = version;
		this.lastUpdTs = lastUpdTs;
		this.commentRk = commentRk;
		this.createTs = createTs;
		this.remark = remark;
		this.remark2 = remark2;
		this.remark3 = remark3;
		this.transDtlSq = transDtlSq;
		this.setBidState(bidState);
	}

	@Id
	@SequenceGenerator(name = "GsrtBidsInfoSequence", sequenceName = "GSRT_BIDS_INFO_SEQ")
	@GeneratedValue(generator = "GsrtBidsInfoSequence", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "MER_ORDER_ID", nullable = false, length = 30)
	public String getMerOrderId() {
		return this.merOrderId;
	}

	@Column(name = "BANK_STATE", precision = 2, scale = 0)
	public String getBankState() {
		return bankState;
	}

	public void setBankState(String bankState) {
		this.bankState = bankState;
	}

	public void setMerOrderId(String merOrderId) {
		this.merOrderId = merOrderId;
	}

	@Column(name = "MER_TXN_TM", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getMerTxnTm() {
		return this.merTxnTm;
	}

	public void setMerTxnTm(Date merTxnTm) {
		this.merTxnTm = merTxnTm;
	}

	@Column(name = "MER_CUST_ID", nullable = false, length = 10)
	public String getMerCustId() {
		return this.merCustId;
	}

	public void setMerCustId(String merCustId) {
		this.merCustId = merCustId;
	}

	@Column(name = "MER_CUST_NAME", nullable = false, length = 100)
	public String getMerCustName() {
		return this.merCustName;
	}

	public void setMerCustName(String merCustName) {
		this.merCustName = merCustName;
	}

	@Column(name = "BID_NO", nullable = false, length = 10)
	public String getBidNo() {
		return this.bidNo;
	}

	public void setBidNo(String bidNo) {
		this.bidNo = bidNo;
	}

	@Column(name = "BID_NAME", nullable = false, length = 80)
	public String getBidName() {
		return this.bidName;
	}

	public void setBidName(String bidName) {
		this.bidName = bidName;
	}

	@Column(name = "MER_TXN_AMT", nullable = false, precision = 20)
	public BigDecimal getMerTxnAmt() {
		return this.merTxnAmt;
	}

	public void setMerTxnAmt(BigDecimal merTxnAmt) {
		this.merTxnAmt = merTxnAmt;
	}

	@Column(name = "MER_TXN_AMT_CUR", precision = 20)
	public BigDecimal getMerTxnAmtCur() {
		return this.merTxnAmtCur;
	}

	public void setMerTxnAmtCur(BigDecimal merTxnAmtCur) {
		this.merTxnAmtCur = merTxnAmtCur;
	}

	@Column(name = "BID_TYPE", length = 4)
	public String getBidType() {
		return this.bidType;
	}

	public void setBidType(String bidType) {
		this.bidType = bidType;
	}

	@Column(name = "INTEREST", precision = 20)
	public BigDecimal getInterest() {
		return this.interest;
	}

	public void setInterest(BigDecimal interest) {
		this.interest = interest;
	}

	@Column(name = "LOAN_LIFE", precision = 22, scale = 0)
	public BigDecimal getLoanLife() {
		return this.loanLife;
	}

	public void setLoanLife(BigDecimal loanLife) {
		this.loanLife = loanLife;
	}

	@Column(name = "LOAN_LIFE_UNIT")
	public String getLoanLifeUnit() {
		return loanLifeUnit;
	}

	public void setLoanLifeUnit(String loanLifeUnit) {
		this.loanLifeUnit = loanLifeUnit;
	}

	@Column(name = "REPAYMENT_TYPE", length = 4)
	public String getRepaymentType() {
		return this.repaymentType;
	}

	public void setRepaymentType(String repaymentType) {
		this.repaymentType = repaymentType;
	}

	@Column(name = "BID_DEADLINE")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getBidDeadline() {
		return this.bidDeadline;
	}

	public void setBidDeadline(Date bidDeadline) {
		this.bidDeadline = bidDeadline;
	}

	@Column(name = "BORROWER_CONSTRACTER_ID", nullable = false, length = 14)
	public String getBorrowerConstracterId() {
		return this.borrowerConstracterId;
	}

	public void setBorrowerConstracterId(String borrowerConstracterId) {
		this.borrowerConstracterId = borrowerConstracterId;
	}

	@Column(name = "IS_TENDER_SURETY", nullable = false, length = 4)
	public String getIsTenderSurety() {
		return this.isTenderSurety;
	}

	public void setIsTenderSurety(String isTenderSurety) {
		this.isTenderSurety = isTenderSurety;
	}

	@Column(name = "TOTAL_LOAN_MAKE_AMT", precision = 20)
	public BigDecimal getTotalLoanMakeAmt() {
		return this.totalLoanMakeAmt;
	}

	public void setTotalLoanMakeAmt(BigDecimal totalLoanMakeAmt) {
		this.totalLoanMakeAmt = totalLoanMakeAmt;
	}

	@Column(name = "TOTAL_RETURN_MONEY_AMT", precision = 20)
	public BigDecimal getTotalReturnMoneyAmt() {
		return this.totalReturnMoneyAmt;
	}

	public void setTotalReturnMoneyAmt(BigDecimal totalReturnMoneyAmt) {
		this.totalReturnMoneyAmt = totalReturnMoneyAmt;
	}

	@Column(name = "TOTAL_LOAN_DIS_AMT", precision = 20)
	public BigDecimal getTotalLoanDisAmt() {
		return this.totalLoanDisAmt;
	}

	public void setTotalLoanDisAmt(BigDecimal totalLoanDisAmt) {
		this.totalLoanDisAmt = totalLoanDisAmt;
	}

	@Column(name = "TOTAL_LOAN_RETURNED_AMT", precision = 20)
	public BigDecimal getTotalLoanReturnedAmt() {
		return totalLoanReturnedAmt;
	}

	public void setTotalLoanReturnedAmt(BigDecimal totalLoanReturnedAmt) {
		this.totalLoanReturnedAmt = totalLoanReturnedAmt;
	}

	@Column(name = "TOTAL_FAILURE_BIDS_AMT", precision = 20)
	public BigDecimal getTotalFailureBidsAmt() {
		return this.totalFailureBidsAmt;
	}

	public void setTotalFailureBidsAmt(BigDecimal totalFailureBidsAmt) {
		this.totalFailureBidsAmt = totalFailureBidsAmt;
	}

	@Column(name = "TOTAL_REPAYMENT_AMT", precision = 20)
	public BigDecimal getTotalRepaymentAmt() {
		return this.totalRepaymentAmt;
	}

	public void setTotalRepaymentAmt(BigDecimal totalRepaymentAmt) {
		this.totalRepaymentAmt = totalRepaymentAmt;
	}

	@Version
	@Column(name = "VERSION", precision = 22, scale = 0)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@Column(name = "LAST_UPD_TS")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getLastUpdTs() {
		return this.lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "COMMENT_RK", length = 50)
	public String getCommentRk() {
		return this.commentRk;
	}

	public void setCommentRk(String commentRk) {
		this.commentRk = commentRk;
	}

	@Column(name = "CREATE_TS", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreateTs() {
		return this.createTs;
	}

	public void setCreateTs(Date createTs) {
		this.createTs = createTs;
	}

	@Column(name = "REMARK", length = 90)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "REMARK2", length = 50)
	public String getRemark2() {
		return this.remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Column(name = "REMARK3", length = 50)
	public String getRemark3() {
		return this.remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	@Column(name = "TRANS_DTL_SQ", precision = 22, scale = 0)
	public Long getTransDtlSq() {
		return transDtlSq;
	}

	public void setTransDtlSq(Long transDtlSq) {
		this.transDtlSq = transDtlSq;
	}

	@Column(name = "BID_STATE", nullable = false, length = 4)
	public String getBidState() {
		return bidState;
	}

	public void setBidState(String bidState) {
		this.bidState = bidState;
	}

	@Column(name = "GOPAY_TXN_TM")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getGopayTxnTm() {
		return this.gopayTxnTm;
	}

	public void setGopayTxnTm(Date gopayTxnTm) {
		this.gopayTxnTm = gopayTxnTm;
	}

	@Column(name = "GOPAY_ORDER_ID", length = 30)
	public String getGopayOrderId() {
		return this.gopayOrderId;
	}

	public void setGopayOrderId(String gopayOrderId) {
		this.gopayOrderId = gopayOrderId;
	}
}
